<!DOCTYPE html>
<html lang="ru">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <title><?=$title ?></title>
    <meta name="description" content="<?=str_replace('"', '', $description); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?=Helper_Index::canonical_url(); ?>
	
	<link href="/media/css/fonts.css" rel="stylesheet"> 
	<link href="/media/css/bootstrap.css" rel="stylesheet">
	<link href="/media/css/font-awesome.min.css" rel="stylesheet">
	<link href="/media/css/style.css?1" rel="stylesheet">
	<link href="/media/css/smoothproducts.css" rel="stylesheet">
	<?php /*<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,300,600&subset=cyrillic-ext,latin' rel='stylesheet' type='text/css'>  */ ?>
	<link href="/media/css/social-likes_classic.css" rel="stylesheet">
	<link rel="shortcut icon" href="/favicon.ico">
    
    <script type="text/javascript">
        var yaParams = {};
    </script>
    <?php
    $user = Model_Auth::instance()->get_user(); ?>
</head>

<body itemscope itemtype="http://schema.org/WebPage">
    <header>
        <div class="container">
            <div class="row">

                <!-- Logo -->
                <div class="col-lg-8 col-md-8 hidden-sm hidden-xs">
                    <div class="well logo">
                        <span class="hlink" data-hlink="<?=base64_encode('/') ?>">
                            CashBack<span>Doc</span>
                        </span>
                        <?php /*<div>Возвращайте деньги с интернет-покупок</div>*/ ?>
                    </div>
                </div>
                <!-- End Logo -->

                <!-- Login -->
                <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
                    <div class="login-register-block pull-right">
                        <?php if ($user): ?>
                        Привет, <?=$user->email ?>! <a href="/my">Мой аккаунт</a> | <a href="/logout">Выход</a>
                        <?php else: ?>
                        <?php /*<span class="hlink" data-hlink="<?=base64_encode('/info/contacts') ?>">Контакты</span> | */ ?><span class="hlink" data-hlink="<?=base64_encode('/login') ?>">Вход</span> | <span class="hlink" data-hlink="<?=base64_encode('/register') ?>">Регистрация</span>
                        <?php endif; ?>
                    </div>
                </div>
                <!-- End Search Form -->
            </div>
        </div>
    </header>    
    
    <div id="fake-top-navigation"></div>
    
    <?=$content ?>

    <footer>
        <div class="container">
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="column">
                    <h4>О нас</h4>
                    <ul>
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/cashback') ?>">Как работает кэшбэк</span></li>
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/partner') ?>">Партнерская программа</span></li> 
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/payment') ?>">Оплата</span></li> 
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/return') ?>">Возврат</span></li> 
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/delivery') ?>">Доставка</span></li> 
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/about') ?>">О проекте</span></li> 
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/privacy') ?>">Политика конфиденциальности</span></li> 
                         <li><span class="hlink" data-hlink="<?=base64_encode('/info/contacts') ?>">Контакты</span></li> 
                    </ul>
                </div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="column">
                    <h4>Каталог</h4>
                    <ul>
                        <li><span class="hlink" data-hlink="<?=base64_encode('/jenskaya-odejda') ?>">Женская одежда</span></li>
                        <li><span class="hlink" data-hlink="<?=base64_encode('/jenskaya-obuv') ?>">Женская обувь</span></li>
                        <li><span class="hlink" data-hlink="<?=base64_encode('/mujskaya-odejda') ?>">Мужская одежда</span></li>
                        <li><span class="hlink" data-hlink="<?=base64_encode('/mujskaya-obuv') ?>">Мужская обувь</span></li>
                    </ul>
                </div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="column">
                    <h4>Поддержка</h4>
                    <ul>
                        <li><span class="hlink" data-hlink="<?=base64_encode('/info/contacts') ?>">Свяжитесь с нами</span></li>
                        <li><span class="hlink" data-hlink="<?=base64_encode('mailto:support@cashbackdoc.com') ?>">Email: support@cashbackdoc.com</span></li>
                    </ul>
                </div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="column">
                    <h4>Мы в соцсетях</h4>
                    <ul class="social">
                        <li><span class="hlink" data-hlink="<?=base64_encode('https://vk.com/cashbackdoc') ?>" data-target="_blank">Вконтакте</span></li>
                        <li><span class="hlink" data-hlink="<?=base64_encode('https://www.facebook.com/cashbackdoc') ?>" data-target="_blank">Facebook</span></li>
                        <li><span class="hlink" data-hlink="<?=base64_encode('https://twitter.com/cashbackdoc') ?>" data-target="_blank">Twitter</span></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="navbar-inverse text-center copyright">
            Copyright &copy; <?=date('Y') ?> CashBackDoc
        </div>
    </footer>    
    
    <?=Helper_Index::top_menu($search_query); ?> 

    <a href="#top" class="back-top text-center" onclick="$('body,html').animate({scrollTop:0},500); return false">
        <i class="fa fa-angle-double-up"></i>
    </a>

    <?php if (isset($_GET['profiler'])): ?>
    <div style="display: none;"><?php echo View::factory('profiler/stats'); ?> </div>
    <?php endif; ?>
    
    <noindex>
    <div class="modal fade" id="login-register-modal" tabindex="-1" role="dialog" aria-labelledby="login-register-modal-label" aria-hidden="true"> 
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                     <h2 class="modal-title" id="login-register-modal-label">Экономьте на онлайн-покупках</h2>
                     
                     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 steps">
                        <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <img src="/media/images/numbers1.png" class="img-circle">
                            </div> 
                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
                                <p class="h4">Зарегистрируйтесь</p>
                            </div> 
                        </div> 
                        
                        <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <img src="/media/images/numbers2.png" class="img-circle">
                            </div> 
                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
                                <p class="h4">Сделайте покупку по нашей ссылке</p>
                            </div> 
                        </div>
                        
                        <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <img src="/media/images/numbers3.png" class="img-circle">
                            </div> 
                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
                                <p class="h4">Получите часть денег назад</p>
                            </div> 
                        </div>
                        <div class="clearfix"></div>                
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="modal-body">
                    <div class="cashback-bonus">
                        <h3 class="text-success">Бонус для новых участников - <strong>50</strong> руб.</h3>
                    </div>
                
                    <hr />
                    <div class="form">
                        <form action="/register" method="post" target="_blank" class="form-horizontal">
                            <div class="form-group">
                                <label for="email" class="control-label col-md-3">Email</label>
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" id="email" name="email" class="form-control" placeholder="mail@mail.ru">
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="email" class="control-label col-md-3">Пароль</label>
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="password" id="password" name="password" class="form-control">
                                </div>
                            </div>

                            <input type="hidden" name="redirect_url" value="" />
                            <input type="hidden" name="utm_marks" value="utm_source=self;utm_medium=modal-cashback-window;utm_content=1" />
                            <div class="form-group">
                                <div class="col-md-9 col-md-offset-3"> 
                                    <button class="btn btn-primary btn-lg" type="submit">Регистрация</button>&nbsp;&nbsp;&nbsp;
                                    <button class="btn" type="submit">Вход</button>
                                </div>
                            </div>
                        </form>
                    </div>
                        
             
                </div>
            </div>
        </div>
    </div>
    <?php /*
    $cashback_popup_showed = isset($_COOKIE['cashback_popup_showed']) ? $_COOKIE['cashback_popup_showed'] : null;
    if (!$user && !$cashback_popup_showed): ?>
    <script type="text/javascript">   
        LoginRegisterManager.startCountdown();
        LoginRegisterManager.showRegister();
    </script>
    <?php
    setcookie('cashback_popup_showed', 1, time()+30*24*60*60, '/');
    endif;*/ ?>
    </noindex>

	<script src="/media/js/jquery.js"></script>
	<script src="/media/js/bootstrap.js"></script>
	<script src="/media/js/mimity.js"></script>
	<script src="/media/js/jquery.unveil.js"></script>
	<script src="/media/js/general.js"></script> 
	<script src="/media/js/smoothproducts.min.js?1"></script>
	<?php /*<script src="/media/js/social-likes.min.js"></script>   */ ?>
	<script src="/media/js/easyTooltip.js"></script>

	<?php if ($user): ?>
	<script type="text/javascript">
		LoginRegisterManager.setLogin(true);
	</script>
	<?php endif; ?>
    
    <!-- Yandex.Metrika counter -->
    <script type="text/javascript">
    (function (d, w, c) {
        (w[c] = w[c] || []).push(function() {
            try {
                w.yaCounter24760844 = new Ya.Metrika({id:24760844,
                        webvisor:true,
                        clickmap:true,
                        trackLinks:true,
                        accurateTrackBounce:true,
                        params:yaParams});
            } catch(e) { }
        });

        var n = d.getElementsByTagName("script")[0],
            s = d.createElement("script"),
            f = function () { n.parentNode.insertBefore(s, n); };
        s.type = "text/javascript";
        s.async = true;
        s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

        if (w.opera == "[object Opera]") {
            d.addEventListener("DOMContentLoaded", f, false);
        } else { f(); }
    })(document, window, "yandex_metrika_callbacks");
    </script>
    <noscript><div><img src="//mc.yandex.ru/watch/24760844" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
    <!-- /Yandex.Metrika counter -->
    
    <script>
     (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
     (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
     m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
     })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

     ga('create', 'UA-52559253-1', 'auto');
     ga('send', 'pageview');

    </script>

</body>
</html>
